package com.example.learn

fun main() {
    println(rabbitCount(12))
}

fun rabbitCount(month: Int) : Int {
    if (month <= 0) return 0
    return when(month) {
        1, 2 -> 1
        else -> rabbitCount(month - 1) + rabbitCount(month - 2)
    }
}